import { WsAxios } from './WsAxios'

/*
* @description 将websocket封装成类似axios的用法
* @type {WsAxios}
* */

const wsAxios = new WsAxios({
  url: '',
  time: 6000,
  ping: () => {}
})

// websocket请求拦截
wsAxios.intercepts.request((params) => {
  console.log(params, '请求拦截：params')
  return params
})

// websocket响应拦截
wsAxios.intercepts.response((response) => {
  console.log('响应拦截：', response)
  return response
})

export default wsAxios
